﻿<%@ Page Language="C#" MasterPageFile="~/WebAdminWithConfirmation.master" AutoEventWireup="true"
    CodeBehind="SmtpSettings.aspx.cs" Inherits="Salient.Web.Administration.AppConfig.SmtpSettings" %>

<%@ Register Assembly="Salient.Web.Administration" Namespace="Salient.Web.Administration"
    TagPrefix="cc1" %>

<%-- Main Content --%>
<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="titleBar">
    <asp:Label runat="server" ID="ConfigureSMTPTitle" Text="<%$ Resources:Title %>" />
</asp:Content>
<asp:Content ID="Content2" runat="server" ContentPlaceHolderID="content">
    <table height="100%" width="90%" cellspacing="0" cellpadding="0">
        <tr class="bodyTextNoPadding">
            <td>
                <asp:Literal ID="Literal1" runat="server" Text="<%$ Resources:Instructions %>" /><br />
                <br />
                <asp:Literal ID="Literal2" runat="server" Text="<%$ Resources:AuthenticationInfoNote %>" />
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td>
                <table cellspacing="0" height="100%" width="60%" cellpadding="4" rules="none" bordercolor="#CCDDEF"
                    border="1" style="border-color: #CCDDEF; border-style: None; border-collapse: collapse;">
                    <tr class="callOutStyle">
                        <td style="padding-left: 10; padding-right: 10;">
                            <asp:Literal ID="Literal3" runat="server" Text="<%$ Resources:Title %>" />
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 10; padding-right: 10;">
                            <table cellspacing="0" height="100%" width="100%" cellpadding="4" border="0">
                                <tr>
                                    <td>
                                        <table class="bodyText" cellspacing="0" height="100%" width="100%" cellpadding="4"
                                            border="0">
                                            <tr>
                                                <td nowrap="nowrap" width="1%">
                                                    <asp:Label ID="Label1" runat="server" AssociatedControlID="ServerNameTextBox" Text="<%$ Resources:ServerNameLabel %>" />
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" ID="ServerNameTextBox" />
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td nowrap="nowrap" width="1%">
                                                    <asp:Label ID="Label2" runat="server" AssociatedControlID="ServerPortTextBox" Text="<%$ Resources:ServerPortLabel %>" />
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" ID="ServerPortTextBox" />
                                                </td>
                                                <td>
                                                    <asp:CompareValidator ID="compareValNonNegativeInteger" Type="Integer" ControlToValidate="ServerPortTextBox"
                                                        ValueToCompare="0" Operator="GreaterThan" ErrorMessage="<%$ Resources:NonNegativeServerPort %>"
                                                        runat="server" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td nowrap="nowrap" width="1%">
                                                    <asp:Label ID="Label3" runat="server" AssociatedControlID="FromTextBox" Text="<%$ Resources:FromLabel %>" />
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" ID="FromTextBox" />
                                                </td>
                                                <td>
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td style="padding-left: 10; padding-right: 10;">
                            <table cellspacing="0" height="100%" width="100%" cellpadding="4" border="0">
                                <tr>
                                    <td>
                                        <table class="bodyText" cellspacing="0" height="100%" width="100%" cellpadding="4"
                                            border="0">
                                            <tr>
                                                <td colspan="4">
                                                    <asp:Label ID="Label4" runat="server" Text="<%$ Resources:AuthenticationLabel %>" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="1%" />
                                                <td width="1%" valign="top">
                                                    <asp:RadioButton runat="server" ID="NoneRadioButton" GroupName="Authentication" AutoPostBack="true"
                                                        OnCheckedChanged="Authentication_ValueChanged" />
                                                </td>
                                                <td width="1%">
                                                    <asp:Label ID="Label5" runat="server" AssociatedControlID="NoneRadioButton" Text="<%$ Resources:NoneRadioButtonText %>" />
                                                </td>
                                                <td />
                                            </tr>
                                            <tr>
                                                <td width="1%" />
                                                <td width="1%" valign="top">
                                                    <asp:RadioButton runat="server" ID="BasicRadioButton" GroupName="Authentication"
                                                        AutoPostBack="true" OnCheckedChanged="Authentication_ValueChanged" />
                                                </td>
                                                <td width="1%" colspan="2">
                                                    <asp:Label ID="Label6" runat="server" AssociatedControlID="BasicRadioButton" Text="<%$ Resources:BasicRadioButtonText %>" /><br />
                                                    <asp:Literal ID="Literal4" runat="server" Text="<%$ Resources:BasicAuthDesc %>" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="1%" />
                                                <td width="1%" />
                                                <td width="1%">
                                                    <asp:Label ID="UserNameLabel" runat="server" AssociatedControlID="UserNameTextBox"
                                                        Text="<%$ Resources:SenderUserNameLabel %>" />
                                                </td>
                                                <td>
                                                    <asp:TextBox runat="server" ID="UserNameTextBox" />
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="1%" />
                                                <td width="1%" />
                                                <td width="1%">
                                                    <asp:Label ID="PasswordLabel" runat="server" AssociatedControlID="PasswordTextBox"
                                                        Text="<%$ Resources:SenderPasswordLabel %>" />
                                                </td>
                                                <td>
                                                    <%-- We need a special password textbox control to retain the text in asterisks in the textbox --%>
                                                    <cc1:PasswordValueTextBox ID="PasswordTextBox" runat="server"></cc1:PasswordValueTextBox>
                                                </td>
                                            </tr>
                                            <tr>
                                                <td width="1%" />
                                                <td width="1%" valign="top">
                                                    <asp:RadioButton runat="server" ID="NTLMRadioButton" GroupName="Authentication" AutoPostBack="true"
                                                        OnCheckedChanged="Authentication_ValueChanged" />
                                                </td>
                                                <td width="1%" colspan="2">
                                                    <asp:Label ID="Label7" runat="server" AssociatedControlID="NTLMRadioButton" Text="<%$ Resources:NTLMRadioButtonText %>" /><br />
                                                    <asp:Literal ID="Literal5" runat="server" Text="<%$ Resources:NTLMAuthDesc %>" />
                                                </td>
                                            </tr>
                                        </table>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr class="userDetailsWithFontSize" valign="top" height="100%">
                        <td style="padding-left: 10; padding-right: 10;" align="right">
                            <asp:Button ID="Button1" runat="server" Text="<%$ Resources:GlobalResources,SaveButtonLabel %>"
                                OnClick="SaveButton_Click" Width="100" />
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr height="100%">
            <td />
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content3" runat="server" ContentPlaceHolderID="buttons">
    <asp:Button ValidationGroup="none" Text="<%$ Resources:GlobalResources,BackButtonLabel %>"
        ID="BackButton" OnClick="ReturnToPreviousPage" runat="server" />
</asp:Content>
<%-- Confirmation Dialog --%>
<asp:Content ID="Content4" runat="server" ContentPlaceHolderID="dialogTitle">
    <asp:Literal ID="Literal6" runat="server" Text="<%$ Resources:Title %>" />
</asp:Content>
<asp:Content ID="Content5" runat="server" ContentPlaceHolderID="dialogContent">
    <table cellspacing="4" cellpadding="4">
        <tr class="bodyText">
            <td>
                <asp:Literal ID="Literal7" runat="server" Text="<%$ Resources:ConfirmationText %>" />
            </td>
        </tr>
    </table>
</asp:Content>
<asp:Content ID="Content6" runat="server" ContentPlaceHolderID="dialogBottomLeftLink">
    <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="AppConfigHome.aspx" Text="<%$ Resources:AppConfigCommon,AppConfigHomeLinkText %>" />
</asp:Content>
<asp:Content ID="Content7" runat="server" ContentPlaceHolderID="dialogBottomRightButton">
    <asp:Button ID="Button2" runat="server" OnClick="ConfirmOK_Click" Text="<%$ Resources:GlobalResources,OKButtonLabel %>"
        Width="75" />
</asp:Content>
